public class StringBufferDemo{
	public static void main(String [] args){
        StringBuffer buffer = new StringBuffer();


        buffer.append('S');
        buffer.append("tringBuffer");
        buffer.insert(2,1205);
        buffer.deleteCharAt(10);
        buffer.setCharAt(6,'L');


        System.out.println(buffer.charAt(1));
        System.out.println(buffer.capacity());
        System.out.println(buffer.indexOf("otring"));


        System.out.println("buffer = " + buffer.toString());
        System.out.println("最大容量为：" + buffer.capacity());
        System.out.println(buffer.indexOf("1205"));
        System.out.println("字符串长度为：" + buffer.length());
	}
}
